<!--
 * @Description: 
 * @Version: 0.0
 * @Author: taosong
 * @Date: 2023-03-26 16:40:05
 * @LastEditors: taosong
 * @LastEditTime: 2023-04-02 15:31:11
-->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta
      http-equiv="X-UA-Compatible"
      content="IE=edge"
    />
    <meta
      name="viewport"
      content="width=device-width, initial-scale=1.0"
    />
    <title>canvas</title>
  </head>
  <body>
    <canvas id="canvas"> 此浏览器不支持canvas </canvas>

    <script>
      const ctx = document.getElementById('canvas')
      const c = ctx.getContext('2d')
      c.fillStyle = 'red'
      c.fillRect(10, 10, 100, 100)
    </script>
  </body>
</html>
